<?php


namespace app\common\validate;
use think\Validate;

class DutyValidate extends Validate
{
    protected $rule =   [
        'class_id'  => 'require',
        'school_id' => 'require',
    ];

    protected $message  =   [
        'class_id.require' => '班级id',
        'school_id.max'     => '学校id'
    ];

    protected $scene = [
        'add'  =>  ['class_id','school_id'],
        'edit'  => ['class_id','school_id']
    ];
}